package com.dc.designPattern._22_responsibilitychain.extend.extend2;

/**
 * Description: 责任链模式_具体请求_具体女性
 * @author: gdc
 * @date: 2021/6/28
 * @version 1.0
 */
public class Women implements IWomen {

    /**
     * 女性的个人状况
     *  1：未嫁
     *  2：出嫁
     *  3：父死
     */
    private int type;

    /**
     * 女性的请示信息
     */
    private String request;

    public Women(int type, String request) {
        this.type = type;
        switch (this.type) {
            case IHandler.FATHER_LEVEL:
                this.request = "女儿的请求是：" + request;
                break;
            case IHandler.HUSBAND_LEVEL:
                this.request = "妻子的请求是：" + request;
                break;
            case IHandler.SON_LEVEL:
                this.request = "母亲的请求是：" + request;
                break;
            default:
                break;
        }
    }

    @Override
    public int getType() {
        return this.type;
    }

    @Override
    public String getRequest() {
        return this.request;
    }
}
